<?php

// 关于我们

namespace app\shop\controller;

use think\Controller;
use app\shop\model\Config as ConfigModel;
use app\shop\model\GoodsType as GoodsTypeModel;

class About extends Controller
{
    /**
     * 关于我们
     * @param ConfigModel $config
     * @return mixed
     */
    public function index(ConfigModel $config, GoodsTypeModel $goodsType)
    {
        // 关于我们信息
        $item = $config->where(['varname' => 'web_description'])->value('varvalue');

        // 获取商品分类信息
        $type_arr = $goodsType->where(['status' => 1])->field('id,parenTid,title')->select();
        $menu = get_cate($type_arr);

        return $this->fetch('', [
            'mate_head' => '关于我们',
            'menu'      => $menu,
            'item'      => $item
        ]);
    }


    /**
     * 帮助信息
     * @return mixed
     */
    public function help()
    {


        return $this->fetch('', [
            'mate_head' => '帮助中心',
        ]);
    }
}